﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TruongVu.Business;
using TruongVu.Data;

namespace TruongVuWebsite.UserControls
{
    public partial class ucNewsEvents : System.Web.UI.UserControl
    {
        News news = new News();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }

        private void LoadData()
        {
            dlNews.DataSource = news.GetNews();
            dlNews.DataBind();
        }
    }
}